home *** CD-ROM | disk | FTP | other *** search
/ Java 1996 August / Java - Summer 1996.iso / kaffe-0.2 / kaffe / gc.h < prev    next >
C/C++ Source or Header  |  1996-02-11  |  817b  |  37 lines

  1. /*
  2.  * gc.h
  3.  * The garbage collector.
  4.  *
  5.  * Copyright (c) 1996 Systems Architecture Research Centre,
  6.  *           City University, London, UK.
  7.  *
  8.  * See the file "license.terms" for information on usage and redistribution
  9.  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
  10.  *
  11.  * Written by Tim Wilkinson <tim@sarc.city.ac.uk>, February 1996.
  12.  */
  13.  
  14. #ifndef __gc_h
  15. #define __gc_h
  16.  
  17. #define    GC_FREE        0
  18. #define    GC_MARK        1
  19. #define    GC_UNMARK    2
  20. #define    GC_GARBAGE    3
  21.  
  22. struct _object;
  23. typedef struct _gcRef {
  24.     int        flags;            /* State of this entry */
  25.     int        idx;            /* This entry index */
  26.     struct _object*    obj;            /* Used - the object */
  27.     struct _gcRef*    next;            /* Free - the next free */
  28. } gcRef;
  29.  
  30. #define    GCREFTABLESZ        1024
  31. #define    GCREFMAX        1024
  32.  
  33. void add_object(struct _object*, bool);
  34. void invokeGarbageCollector(void);
  35.  
  36. #endif
  37.